#include<algorithm>
#include<cstdio>
using namespace std;
int main(){
    //freopen("in.txt","r",stdin);
    int N,M;
    scanf("%d %d",&N,&M);
    int inp[N];
    for(int i=0;i<N;i++){
        scanf("%d",&inp[i]);
    }
    sort(inp,inp+N);
    int left=0,right=N-1,sum;
    while(left<right){
        sum=inp[left]+inp[right];
        if(sum==M){
            printf("%d %d\n",inp[left],inp[right]);
            return 0;
        }
        else if(sum<M){
            left++;
        }
        else if(sum>M){
            right--;
        }
    }
    printf("No Solution\n");
    return 0;
}
